//
//  LYMineVideoCell.m
//  artist
//
//  Created by Jay_Apple on 16/5/9.
//  Copyright © 2016年 viviyoo. All rights reserved.
//

#import "LYMineVideoCell.h"
#import "LYCollectListModel.h"
#import "NSDate+Utils.h"

@interface LYMineVideoCell ()

@property (weak, nonatomic) IBOutlet UIImageView *icon;

@property (weak, nonatomic) IBOutlet UILabel *name;

@property (weak, nonatomic) IBOutlet UILabel *desc;
@property (weak, nonatomic) IBOutlet UILabel *title;
@property (weak, nonatomic) IBOutlet UILabel *time;

@property (weak, nonatomic) IBOutlet UILabel *viewNum;

@end

@implementation LYMineVideoCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModel:(LYMyVideoListModel *)model{

    _model = model;
    
    [self.icon sd_setImageWithURL:[NSURL URLWithString:_model.image] placeholderImage:[UIImage imageNamed:@"contacts_default_avatar"]];
    
    self.desc.text = _model.desc;
    self.name.text = _model.title;
    self.title.text = _model.nick_name;
    self.viewNum.text = [NSString stringWithFormat:@"%zd人观看",_model.view_num];
    
    NSDate *date = [NSDate dateFromTimeStampString:_model.create_time];
    self.time.text = [date string];

}

@end
